<template>
  <div class="container">
    <headerBar :title="local.addGoodsInStorage" @changeLan="changeLan" @pageReturn="pageReturn"></headerBar>
    <div class="all" :style="{paddingTop: pdt+'px'}" style="margin-bottom: 112rpx;">
      <div class="top">
        <div class="select-panel">
          <div class="panel-supplier">
            <div class="name">
              <span style="color:red">*</span>
              {{local.supplier}}：
            </div>
            <div class="page" style="border-bottom: 2rpx solid;">
              <picker
                class="weui-btn"
                @change="PickerChange"
                :value="indexPicker"
                :range="array"
                :range-key="'supplierName'"
              >
                <input
                  type="default"
                  v-model="saveObj.supplierName"
                  disabled
                  :placeholder="local.peleaseEnter"
                />
                <span class="unit">▼</span>
              </picker>
            </div>
          </div>
          <div class="panel-supplier">
            <div class="name">
              <span style="color: red;">*</span>
              {{local.buyArea}}：
            </div>
            <div class="page" style="border-bottom: 2rpx solid;">
              <picker
                class="weui-btn"
                @change="changeBuyArea"
                :range="buyAreaList"
                :value="buyAreaPickerIndex"
                range-key="buyAreaName"
              >
                <input
                  type="default"
                  v-model="saveObj.buyAreaName"
                  disabled
                  :placeholder="local.peleaseEnter"
                />
                <span class="unit">▼</span>
              </picker>
            </div>
          </div>
          <div class="panel-ware">
            <div class="name">
              <span style="color: red;">*</span>
              {{local.warehouseIn}}：
            </div>
            <div class="page" style="border-bottom: 2rpx solid;">
              <picker
                class="weui-btn"
                @change="PickerWarehouseChange"
                :value="indexWarePicker"
                :range="arrayWarehouse"
                :range-key="'warehouseName'"
              >
                <input
                  type="default"
                  v-model="saveObj.warehouseName"
                  disabled
                  :placeholder="local.option"
                />
                <span class="unit">▼</span>
              </picker>
            </div>
          </div>
          <div class="panel-goods">
            <div class="name">{{local.goodsName}}：</div>
            <div class="names-goods">{{saveObj.goodsName}}</div>
          </div>
        </div>
      </div>
      <div class="select-photo">
        <div class="a name">
          <span style="color: red;">*</span>
          {{local.photosBeforeAcceptance}}
        </div>
        <div class="b">
          <div class="page">
            <div class="weui-uploader__bd">
              <div class="weui-uploader__files" id="uploaderFiles">
                <block v-for="(item, index) in files" :key="index">
                  <div class="weui-uploader__file" @click="predivImage" :id="item">
                    <img class="weui-uploader__img" :src="item" mode="aspectFill" />
                    <div
                      style="color: #DE6E7C;display: flex;justify-content: center;font-size: 26rpx;"
                      @click="deleteImg(files,index)"
                    >{{local.deletesingle}}</div>
                  </div>
                </block>
              </div>
              <div class="weui-uploader__input-box">
                <div class="weui-uploader__input" @click="chooseImage"></div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="stock-detail-panel">
        <div class="stock-detail-belt">
          <span class="name">
            <span style="color: red;width: 2rpx;">*</span>
            {{local.beltType}}：
          </span>
          <div class style="border-bottom: 2rpx solid;">
            <picker
              class="weui-btn"
              @change="PickerBeltChange"
              :value="indexBeltPicker"
              :range="arrayBelt"
              :range-key="'dictLabel'"
            >
              <input type="default" v-model="beltTypeName" disabled :placeholder="local.option" />
              <span class="unit">▼</span>
            </picker>
          </div>
        </div>
        <div class="msg-detail-thickness" v-if="beltTypeNameInputFlag">
          <span class="name">
            <span style="color: red;width: 2rpx;">*</span>
            {{local.beltTypeName}}：
          </span>
          <div class style="border-bottom: 2rpx solid;">
            <input
              v-model="beltTypeNameInput"
              @input="changeBeltTypeNameInput"
              :placeholder="local.peleaseEnter"
            />
          </div>
        </div>
        <div class="msg-detail-grade">
          <span class="name">
            <span style="color: red;width: 2rpx;">*</span>
            {{local.grade}}：
          </span>
          <div class style="border-bottom: 2rpx solid;">
            <picker
              class="weui-btn"
              @change="PickerLevelChange"
              :value="indexLevelPicker"
              :range="arrayLevel"
              :range-key="'dictLabel'"
            >
              <input type="default" v-model="goodsLevelName" disabled :placeholder="local.option" />
              <span class="unit">▼</span>
            </picker>
          </div>
        </div>
        <div class="msg-detail-thickness">
          <span class="name">
            <span style="color: red;width: 2rpx;">*</span>
            {{local.thickness}}：
          </span>
          <div class style="border-bottom: 2rpx solid;">
            <input type="digit" v-model="saveObj.sizeHeight" :placeholder="local.peleaseEnter" />
            <span class="unit">MM</span>
          </div>
        </div>
        <div class="msg-detail-width">
          <span class="name">
            <span style="color: red;width: 2rpx;">*</span>
            {{local.width}}：
          </span>
          <div class style="border-bottom: 2rpx solid;">
            <input type="digit" v-model="saveObj.sizeWidth" :placeholder="local.peleaseEnter" />
            <span class="unit">MM</span>
          </div>
        </div>
        <div class="msg-detail-long">
          <span class="name">
            <span style="color: red;width: 2rpx;">*</span>
            {{local.length}}：
          </span>
          <div class style="border-bottom: 2rpx solid;">
            <input type="digit" v-model="saveObj.sizeLong" :placeholder="local.peleaseEnter" />
            <span class="unit" style="right: 16%;text-align: left;width: 5%;">M</span>
            <picker
              style="width: 10%;font-size: 38rpx;"
              class="weui-btn"
              @change="PickerSymbolChange"
              :value="indexSymbolPicker"
              :range="arraySymbol"
            >
              <input type="default" v-model="arraySymbol[indexSymbolPicker]" disabled />
            </picker>
          </div>
        </div>
        <div class="msg-detail-long">
          <span class="name">
            <span style="color: red;width: 2rpx;">*</span>
            {{local.weight}}：
          </span>
          <div class style="border-bottom: 2rpx solid;">
            <input type="digit" v-model="saveObj.weight" :placeholder="local.peleaseEnter" />
            <span class="unit">T</span>
          </div>
        </div>
        <div class="msg-detail-grade">
          <span class="name">{{local.frameType}}：</span>
          <div class style="border-bottom: 2rpx solid;">
            <picker
              class="weui-btn"
              @change="PickerFrameTypeChange"
              :value="indexFrameTypePicker"
              :range="arrayFrameType"
              :range-key="'dictLabel'"
            >
              <input type="default" v-model="frameTypeText" disabled :placeholder="local.option" />
              <span class="unit">▼</span>
            </picker>
          </div>
        </div>
        <!-- 框架类型（indexHubPicker=0），则出现hub-->
        <div class="msg-detail-grade" v-if="indexFrameTypePicker == 0">
          <span class="name">{{local.hub}}：</span>
          <div class style="border-bottom: 2rpx solid;">
            <picker
              class="weui-btn"
              @change="PickerHubChange"
              :value="indexHubPicker"
              :range="arrayHub"
              :range-key="'dictLabel'"
            >
              <input type="default" v-model="hubText" disabled :placeholder="local.option" />
              <span class="unit">▼</span>
            </picker>
          </div>
        </div>
        <!-- hub选择其他（indexHubPicker=2），则出现hub 备注-->
        <div class="msg-detail-long" v-if="indexHubPicker == 2">
          <span class="name">{{local.hubName}}：</span>
          <div class style="border-bottom: 2rpx solid;">
            <input type="text" v-model="saveObj.hubName" :placeholder="local.peleaseEnter" />
          </div>
        </div>
        <div class="msg-detail-grade" v-if="indexFrameTypePicker == 1">
          <span class="name">{{local.steelReel}}：</span>
          <div class style="border-bottom: 2rpx solid;">
            <picker
              class="weui-btn"
              @change="PickerSteelReelChange"
              :value="indexSteelReelPicker"
              :range="arraySteelReel"
              :range-key="'dictLabel'"
            >
              <input type="default" v-model="steelReelText" disabled :placeholder="local.option" />
              <span class="unit">▼</span>
            </picker>
          </div>
        </div>
        <!-- steelReel选择其他（indexSteelReelPicker=4），则出现hub 备注-->
        <div class="msg-detail-long" v-if="indexSteelReelPicker == 4">
          <span class="name">{{local.steelReelName}}：</span>
          <div class style="border-bottom: 2rpx solid;">
            <input type="text" v-model="saveObj.steelReelName" :placeholder="local.peleaseEnter" />
          </div>
        </div>
      </div>

      <div class="stock-detail-panel">
        <div class="msg-detail-long">
          <span
            class="name"
            :class="lang == 'zh'||lang =='zh_CN'?'w_100':'w_160'"
          >{{local.weighbridgeTerminalNo}}：</span>
          <div class style="border-bottom: 2rpx solid;width: auto;flex: 1;">
            <input v-model="saveObj.weightBridgePier" :placeholder="local.peleaseEnter" />
          </div>
        </div>
        <div class="msg-detail-long">
          <span
            class="name"
            :class="lang == 'zh'||lang =='zh_CN'?'w_100':'w_160'"
          >{{local.supplierInvoiceNumber}}：</span>
          <div class style="border-bottom: 2rpx solid;width: auto;flex: 1;">
            <input v-model="saveObj.supplierInvoice" :placeholder="local.peleaseEnter" />
          </div>
        </div>
        <div class="msg-detail-long">
          <div class="name jt_flex_row_right" style="width:190rpx">{{local.invoiceDate}}：</div>
          <!--            <div class="names-goods">{{saveObj.invoiceDate}}</div>-->
          <picker
            class="weui-btn"
            style="flex: 1;"
            mode="date"
            :value="this.saveObj.invoiceDate"
            start="1999/01/01"
            end="2099/01/01"
            @change="TimeChange"
          >
            <input
              style="border-bottom: 2rpx solid;width: auto;flex: 1;"
              :value="date"
              :placeholder="local.peleaseEnter"
              disabled
            />
          </picker>
        </div>
      </div>
      <div class="remark">
        <div>{{local.remark1}}:</div>
        <textarea
          v-model="saveObj.remark"
          style="height: 100rpx;max-width: 879rpx;resize: none;padding-left: 18rpx;"
        ></textarea>
      </div>
      <div class="remark">
        <div>{{local.remark2}}:</div>
        <textarea
          v-model="saveObj.remark2"
          style="height: 100rpx;max-width: 879rpx;resize: none;padding-left: 18rpx;"
        ></textarea>
      </div>
      <div class="bottom-bar">
        <div class="save-draft" @click="saveDraft()">{{local.saveDraft}}</div>
        <button class="confirm" style="font-size: 26rpx;" @click="submit">{{local.confirm}}</button>
      </div>
    </div>
  </div>
</template>
<script>
import home from '@/api/home'
import headerBar from '@/components/headerBar'
import Shop from '../../../../config/shop'
import { throttle } from '@/utils/throttle'
export default {
  components: {
    headerBar
  },
  onShow () {
    this.initLang()
    this.initData()
  },
  onLoad () {
    this.initLang()
    this.getWarehouseList()
    this.getBelt()
    this.getLevel()
    this.getDict('hubType')
    this.getDict('steelReel')
    this.resettingData()
    this.pdt = this.globalData.CustomBar
  },
  computed:{
    date(){
      return this.saveObj.invoiceDate ? wx.$timeFormat(this.saveObj.invoiceDate) : '' // new Date(this.saveObj.invoiceDate).$format('dd/MM/yyyy') : ''
    }
  },
  methods: {
    TimeChange (e) {
      this.saveObj.invoiceDate = e.mp.detail.value
    },
    initLang(){
      this.local = wx.getStorageSync('local')
      this.lang = wx.getStorageSync('lang')
    },
    deleteImg (list,index) {
      this.files.splice(index,1)  //本地照片列表
      this.saveObj.beginPicUrlList.splice(index,1)  //真实照片列表
    },
    initData () {
      this.array = wx.getStorageSync('supplierArray') || []
      this.buyAreaList = wx.getStorageSync('buyAreaList') || []
    },
    pageReturn () {
      this.resettingData()
    },
    changeLan (val, lang) {
      this.local = val
      this.lang = lang
    },
    async getBelt () {
      const {rows} = await home.getBeltLevel({dictType: 'beltType'})
      this.arrayBelt = rows
      this.saveObj.beltType = this.arrayBelt[0].dictValue
    },
    async getDict (type) {
      const {rows} = await home.getBeltLevel({dictType: type})
      switch(type){
        case 'hubType':
          this.arrayHub = rows
          this.saveObj.hub = this.arrayHub[0].dictValue
          break
        case 'steelReel':
          this.arraySteelReel = rows
          this.saveObj.steelReel = this.arraySteelReel[0].dictValue
          break
      }
    },
    async getLevel () {
      const {rows} = await home.getBeltLevel({dictType: 'goodsLevel'})
      this.arrayLevel = rows
      this.saveObj.goodsLevel = this.arrayLevel[0].dictValue
    },
    async getSupplierList () {
      const {rows} = await home.getSupplierList()
      this.array = rows
    },
    async getWarehouseList () {
      const {rows} = await home.getWarehouseList()
      this.arrayWarehouse = rows
    },
    async getGoodsName (supplierName) {
      const data = await home.getGoodsName({supplierName: supplierName})
      this.saveObj.goodsName = data.msg
    },
    async saveDraft () {
      // 保存草稿，只有验收前照片
      this.saveObj.beginPicUrl = this.saveObj.beginPicUrlList.join()

      //保存草稿箱时，去除beginPicList
      let { beginPicUrlList, ...params } = this.saveObj
      const data = await home.addInStock(params)
      if (data.code !== 0) {
        wx.showToast({
          title: data.msg,
          icon: 'none',
          duration: 2000
        })
        return
      }
      wx.showLoading({
        title: `${this.local.jumping}`
      })
      this.gotoPage('/packageA/pages/stockInDraft/index')
    },
    submit () {
      // 确认提交，还要验收后照片
      const flag = {
        supplierId: this.local.supplier, //  供应商id
        supplierName: this.local.supplier,
        warehouseId: this.local.warehouseIn, // 仓库id
        warehouseName: this.local.warehouseIn,
        goodsName: this.local.goodsName, //    商品名称
        beltType: this.local.beltType, //   皮带类型
        goodsLevel: this.local.grade, //   等级
        sizeHeight: this.local.thickness, //   厚度
        sizeWidth: this.local.width, //   宽度
        sizeLong: this.local.length, //   长度
        weight: this.local.weight, //   净重
        // totalWeight: '', //  总重
        remark: this.local.remark, //  备注
        remark2: this.local.remark2, //  备注2
        beginPicUrl: this.local.photosBeforeAcceptance,
        beginPicUrlList: this.local.photosBeforeAcceptance, // 验收前照片
        weightBridgePier: this.local.weighbridgeTerminalNo,
        supplierInvoice: this.local.supplierInvoiceNumber,
        invoiceDate: this.local.invoiceDate,
        hub: this.local.hub,
        hubName: this.local.hubName,
        steelReel: this.local.steelReel,
        steelReelName: this.local.steelReelName,
      }
      this.saveObj.beginPicUrl = this.saveObj.beginPicUrlList.join()
      
      let map = ['frameType','remark','remark2','weightBridgePier','supplierInvoice','invoiceDate','hub','hubName','steelReel','steelReelName','beltTypeName']
      for (let i in this.saveObj) {
        if (this.saveObj[i] == '' && !map.includes(i)) {
          wx.showToast({
            title: `${flag[i]}${this.local.required}`,
            icon: 'none',
            duration: 2000
          })
          return
        }
      }
     if(this.indexBeltPicker == null){
        wx.showToast({
            title: `${this.local.beltType}${this.local.required}`,
            icon: 'none',
            duration: 2000
          })
          return
      }
      if(this.indexLevelPicker == null){
        wx.showToast({
            title: `${this.local.grade}${this.local.required}`,
            icon: 'none',
            duration: 2000
          })
          return
      }
      this.saveObj.beltType = this.arrayBelt[this.indexBeltPicker].dictValue
      this.saveObj.goodsLevel = this.arrayLevel[this.indexLevelPicker].dictValue
      wx.setStorageSync('stockInObj', this.saveObj)
      wx.showLoading({
        title: `${this.local.jumping}`
      })
      this.gotoPage(`../../pages/stockInDetails/index?page=1`)
    },
    gotoPage: throttle(
      0,
      false,
      function (url) {
        this._func(url)
      },
      false
    ),
    _func (url) {
      wx.navigateTo({
        url: url
      })
      wx.hideLoading()
    },
    PickerFrameTypeChange(e){
      this.indexFrameTypePicker = e.mp.detail.value
      this.frameTypeText = this.arrayFrameType[e.mp.detail.value].dictLabel
      this.saveObj.frameType = this.arrayFrameType[e.mp.detail.value].dictValue

      //切换框架类型时，清空 hub/轮轴
      this.indexHubPicker = null
      this.indexSteelReelPicker = null
      this.saveObj.hubName = ''
      this.hubText = ''
      this.steelReelText = ''
      this.saveObj.steelReelName = ''
      this.saveObj.hub = ''
      this.saveObj.steelReel = ''
    },
    PickerHubChange(e){
      this.indexHubPicker = e.mp.detail.value
      this.hubText = this.arrayHub[e.mp.detail.value].dictLabel
      this.saveObj.hub = this.arrayHub[e.mp.detail.value].dictValue
    },
    PickerSteelReelChange(e){
      this.indexSteelReelPicker = e.mp.detail.value
      this.steelReelText = this.arraySteelReel[e.mp.detail.value].dictLabel
      this.saveObj.steelReel = this.arraySteelReel[e.mp.detail.value].dictValue
    },
    PickerSymbolChange (e) {
      this.indexSymbolPicker = e.mp.detail.value
      this.saveObj.semiology = this.arraySymbol[e.mp.detail.value]
    },
    PickerChange (e) {
      console.log(e)
      this.indexPicker = e.mp.detail.value
      this.saveObj.supplierName = this.array[e.mp.detail.value].supplierName
      this.saveObj.supplierId = this.array[e.mp.detail.value].supplierId
      this.getGoodsName(this.saveObj.supplierName)
    },
    PickerWarehouseChange (e) {
      this.indexWarePicker = e.mp.detail.value
      this.saveObj.warehouseName = this.arrayWarehouse[
        e.mp.detail.value
        ].warehouseName
      this.saveObj.warehouseId = this.arrayWarehouse[
        e.mp.detail.value
        ].warehouseId
    },
    PickerBeltChange (e) {
      this.indexBeltPicker = e.mp.detail.value
      this.beltTypeName = this.arrayBelt[e.mp.detail.value].dictLabel
      if (this.beltTypeName == '其它'||this.beltTypeName=='其他') {
        this.beltTypeNameInputFlag = true
      } else {
        this.beltTypeNameInputFlag = false
      }
      this.saveObj.beltType = this.arrayBelt[e.mp.detail.value].dictValue
    },
    changeBeltTypeNameInput (e) {
      this.beltTypeNameInput = e.mp.detail.value
      this.saveObj.beltTypeName = e.mp.detail.value
    },
    PickerLevelChange (e) {
      this.indexLevelPicker = e.mp.detail.value
      this.goodsLevelName = this.arrayLevel[e.mp.detail.value].dictLabel
      this.saveObj.goodsLevel = this.arrayLevel[e.mp.detail.value].dictValue
    },
    routerToUrl (url) {
      wx.navigateTo({
        url
      })
    },
    chooseImage (e) {
      var _this = this
      _this.saveObj.beginPicUrlList = []
      wx.chooseImage({
        sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
        sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
        success: function (res) {
          // 返回选定照片的本地文件路径列表，tempFilePath可以作为img标签的src属性显示图片
          _this.files = _this.files.concat(res.tempFilePaths)
          _this.files.map((item, i) => {
            wx.uploadFile({
              url: `${Shop.BASE_URL}applet/buy/storage/common/upload`,
              filePath: item, // chooseImage上传的图片
              name: 'file', // 需要传给后台的图片字段名称
              formData: item, // 需要传给后台的其他表单数据
              header: {
                Authorization: wx.getStorageSync('token')
              },
              success: res => {
                if (res.statusCode == 200) {
                  let {code, url, msg} = JSON.parse(res.data)
                  if (code == 0) {
                   // _this.saveObj.beginPicUrl.push(url)
                    _this.saveObj.beginPicUrlList.push(url)
                  } else {
                    wx.showToast({
                      title: msg,
                      duration: 4000,
                      icon: 'none'
                    })
                  }
                } else {
                  wx.showToast({
                    title: _this.local.uploadFail,
                    duration: 4000,
                    icon: 'none'
                  })
                }
              }
            })
          })
        },
        fail: function () {
        },
        complete: function () {
        }
      })
    },
    changeBuyArea(e){
      const {value} = e.target
      const {buyAreaName,buyAreaId} = this.buyAreaList[value]
      this.buyAreaPickerIndex = value
      this.saveObj.buyAreaName = buyAreaName
      this.saveObj.buyAreaId = buyAreaId
    },
    predivImage (e) {
      wx.previewImage({
        current: e.currentTarget.id, // 当前显示图片的http链接
        urls: this.files // 需要预览的图片http链接列表
      })
    },
    resettingData () {
      //重置数据方法
      this.files = []
      this.beltTypeName = ''
      this.goodsLevelName = ''
      this.hubText = ''
      this.steelReelText = ''
      this.frameTypeText = ''
      this.saveObj = {
        weightBridgePier: '',
        supplierInvoice: '',
        supplierId: 0, //  供应商id
        supplierName: '',
        warehouseId: 0, // 仓库id
        warehouseName: '',
        goodsName: '', //    商品名称
        beltType: '', //   皮带类型
        goodsLevel: '', //   等级
        sizeHeight: '', //   厚度
        sizeWidth: '', //   宽度
        sizeLong: '', //   长度
        weight: '', //   净重
        frameType: '',
        hub: '',
        hubName: '',
        steelReel: '',
        steelReelName: '',
        // totalWeight: '', //  总重
        remark: '', //  备注
        remark2: '', //  备注2
        beginPicUrl: '', // 验收前照片
        beginPicUrlList: [],
        semiology: this.arraySymbol[this.indexSymbolPicker],
        beltTypeName: '',
        invoiceDate: ''
        // endPicUrl: '2020-06-20' // 验收后照片
      }
      this.beltTypeNameInput = ''
      this.indexPicker = 0
      this.indexBeltPicker = null
      this.indexLevelPicker = null
      this.indexWarePicker = 0
      this.indexHubPicker = 0
      this.indexSteelReelPicker = 0
      this.indexFrameTypePicker = null
    }
    },
  data() {
    return {
      beltTypeNameInputFlag: false,
      beltTypeNameInput: '',
      imgUrl: Shop.IMG_URL,
      goodsLevelName: '',
      beltTypeName: '',
      hubText: '',
      steelReelText:'',
      frameTypeText: '',
      lang: wx.getStorageSync('lang'),
      confirmDisable: false,
      // buttonClicked: false,
      disablebtn: false,
      pdt: 66,
      local: wx.getStorageSync('local'),
      code: '', // 编号
      goodsName: '',
      saveObj: {
        supplierId: 0, //  供应商id
        supplierName: '',
        warehouseId: 0, // 仓库id
        warehouseName: '',
        goodsName: '', //    商品名称
        beltType: '', //   皮带类型
        goodsLevel: '', //   等级
        sizeHeight: '', //   厚度
        sizeWidth: '', //   宽度
        sizeLong: '', //   长度
        weight: '', //   净重
        hub: '',
        hubName: '',
        steelReel: '',
        steelReelName: '',
        // totalWeight: '', //  总重
        remark: '', //  备注
        remark2: '', //  备注2
        beginPicUrl: '', // 验收前照片
        beginPicUrlList: [],
        invoiceDate: '',
        buyAreaName:'',
        buyAreaId:''
        // endPicUrl: '2020-06-20' // 验收后照片
      },
      files: [],
      symbol: '',
      indexSymbolPicker: 0,
      indexPicker: 0,
      indexBeltPicker: 0,
      indexLevelPicker: 0,
      indexWarePicker: 0,
      indexHubPicker: 0,
      indexSteelReelPicker: 0,
      indexFrameTypePicker: null,
      arraySymbol: ['>=', '<='],
      array: ['美国', '中国', '阿拉伯', '非洲'],
      arrayWarehouse: ['1号仓库', '2号仓库', '3号仓库', '4号仓库'],
      arrayLevel: ['A', 'B', 'C', 'D', 'E'],
      arrayBelt: ['1', '4', '2', '3', '6'],
      arraySteelReel: [],
      arrayHub: [],
      arrayFrameType: wx.getStorageSync('frameType') || [],
      logs: [],
      fileList: [],
      buyAreaList:[],
      buyAreaPickerIndex:0
    }
  }
}
</script>

<style scoped lang="scss">
@import 'index';
.log-list {
  display: flex;
  flex-direction: column;
  padding: 40rpx;
}

.log-item {
  margin: 10rpx;
}
</style>
